package br.com.lh.urabuilder.control
{
	import br.com.lh.urabuilder.command.AddActionCommand;
	import br.com.lh.urabuilder.command.ClosePopupCommand;
	import br.com.lh.urabuilder.command.DeleteSelectedActionsCommand;
	import br.com.lh.urabuilder.command.LinkActionCommand;
	import br.com.lh.urabuilder.command.LoadUraCommand;
	import br.com.lh.urabuilder.command.LoadUraResourcesCommand;
	import br.com.lh.urabuilder.command.MoveActionCommand;
	import br.com.lh.urabuilder.command.NewUraCommand;
	import br.com.lh.urabuilder.command.RemoveActionCommand;
	import br.com.lh.urabuilder.command.SaveConditionalPropertiesCommand;
	import br.com.lh.urabuilder.command.SavePropertiesCommand;
	import br.com.lh.urabuilder.command.SaveUraCommand;
	import br.com.lh.urabuilder.command.SetInitialActionCommand;
	import br.com.lh.urabuilder.command.ZoomComand;
	import br.com.lh.urabuilder.event.AddActionEvent;
	import br.com.lh.urabuilder.event.ClosePopupEvent;
	import br.com.lh.urabuilder.event.DeleteSelectedActionsEvent;
	import br.com.lh.urabuilder.event.LinkActionEvent;
	import br.com.lh.urabuilder.event.LoadUraEvent;
	import br.com.lh.urabuilder.event.LoadUraResourceEvent;
	import br.com.lh.urabuilder.event.MoveActionEvent;
	import br.com.lh.urabuilder.event.NewUraEvent;
	import br.com.lh.urabuilder.event.RemoveActionEvent;
	import br.com.lh.urabuilder.event.SaveConditionalPropertiesEvent;
	import br.com.lh.urabuilder.event.SavePropertiesEvent;
	import br.com.lh.urabuilder.event.SaveUraEvent;
	import br.com.lh.urabuilder.event.SetInitialActionEvent;
	import br.com.lh.urabuilder.event.ZoomEvent;
	
	import com.sophware.undoredo.commands.UndoStackCommand;
	import com.sophware.undoredo.control.UndoFrontController;
	import com.sophware.undoredo.control.UndoStackEvent;
	
	public class UraController extends UndoFrontController
	{
		public function UraController(){
			initialiseCommands();
		}
		
		public function initialiseCommands():void{
			addCommand(AddActionEvent.EVENT_ADD_ACTION,AddActionCommand);
			addCommand(NewUraEvent.EVENT_NEW_URA,NewUraCommand);
			addCommand(MoveActionEvent.EVENT_MOVE_ACTION,MoveActionCommand);
			addCommand(LinkActionEvent.EVENT_LINK_ACTION,LinkActionCommand);
			addCommand(RemoveActionEvent.EVENT_REMOVE_ACTION,RemoveActionCommand);
			addCommand(SavePropertiesEvent.EVENT_SAVE_PROPERTIES_ACTION,SavePropertiesCommand);
			addCommand(SaveConditionalPropertiesEvent.EVENT_SAVE_CONDITIONAL_PROPERTIES_ACTION,SaveConditionalPropertiesCommand);
			addCommand(DeleteSelectedActionsEvent.EVENT_DELETE_ACTION,DeleteSelectedActionsCommand);
			addCommand(ClosePopupEvent.EVENT_CLOSE_POPUP_ACTION,ClosePopupCommand);
			addCommand(SaveUraEvent.EVENT_SAVE_URA_ACTION,SaveUraCommand);
			addCommand(LoadUraEvent.EVENT_LOAD_URA_ACTION,LoadUraCommand);
			addCommand(SetInitialActionEvent.EVENT_SET_INITIAL_ACTION,SetInitialActionCommand);
			addCommand(ZoomEvent.EVENT_ZOOM,ZoomComand);
			addCommand(LoadUraResourceEvent.EVENT_LOAD_URA_RESOURCE_ACTION,LoadUraResourcesCommand);
			addCommand(UndoStackEvent.REDO,UndoStackCommand);
			addCommand(UndoStackEvent.UNDO,UndoStackCommand);
		}

	}
}